﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nim.Game;
using Nim.IO;

namespace Nim.Menu
{
    public class NimMenu
    {
        //Show the Menu
        private static void ShowMenu()
        {
            Console.WriteLine("Welcome To Nim");
            Console.WriteLine("Prepare to be TROLOLOLOL");
            Console.WriteLine("1. Play against a friend");
            Console.WriteLine("2. Play against the computer");
            Console.WriteLine("3. Have the AI fight to the DEATH!");
        }

        //Gets the game mode 1 for against a person, 2 for against the CPU
        public static int GetGameMode()
        {
            ShowMenu();
            bool valid = false;
            int mode = 0;

            do
            {
                int choice = KeyBoard.GetInt("Which would you like to play?");

                if (choice > 0 && choice < 4)
                {
                    valid = true;
                    mode = choice;
                }

            } while (!valid);

            return mode;
        }
    }
}
